<!DOCTYPE html>
<html>

    <head>
        <meta name="layout" content="main"/>
        <g:set var="entityName" value="${message(code: 'role.label', default: 'Role')}"/>
        <title>角色详情</title>
    </head>

    <body class="fixed-navbar fixed-sidebar">
        <div class="small-header">
            <div class="hpanel">
                <div class="panel-body">
                    <div id="hbreadcrumb" class="pull-right">
                        <ol class="hbreadcrumb breadcrumb">
                            <li>PLS CINDATA</li>
                            <li>
                                <g:link controller="role" action="index">角色管理</g:link>
                            </li>
                            <li class="active">
                                <span>角色详情</span>
                            </li>
                        </ol>
                    </div>
                    <h2 class="font-light m-b-xs">
                        角色管理
                    </h2>
                </div>
            </div>
        </div>
        <div class="content animate-panel">
            <div class="row">
                <div class="hpanel hblue">
                    <div class="panel-heading">
                        <div class="panel-tools">
                            <g:link class="btn btn-info btn-xs" action="edit" resource="${this.role}">
                                <i class="fa fa-edit"></i>编辑</g:link>
                        </div>
                        角色详情
                    </div>
                    <div class="panel-body">
                        <div class="text-muted font-bold m-b-xs ol-md-6">
                            <div class="col-md-6">
                                <h4>
                                    <a href=>${this.role?.authority}(${this.role?.name})</a>
                                </h4>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="hpanel hgreen">
                    <div class="panel-heading">
                        <div class="panel-tools">
                            <a class="showhide">
                                <g:link class="btn btn-info btn-xs" controller="roleCategoryMenu" action="create" params="[role: this.role?.id]">
                                <i class="fa fa-plus"></i>新增</g:link>
                            </a>
                        </div>
                        贷款方式
                    </div>

                    <div class="panel-body no-padding">
                        <div class="table-responsive">
                            <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center">
                                <thead>
                                <tr>
                                    <g:sortableColumn property="name" title="贷款方式" class="col-md-1 text-center"
                                                      params="${params}"/>
                                    <g:sortableColumn property="parent" title="所属分类" class="col-md-1 text-center"
                                                      params="${params}"/>
                                    <g:sortableColumn property="URL" title="URL" class="col-md-1 text-center"
                                                      params="${params}"/>
                                    <g:sortableColumn property="orderNum" title="排序" class="col-md-1 text-center"
                                                      params="${params}"/>
                                </tr>
                                </thead>
                                <tbody>
                                <g:each in="${roleCategoryList}">
                                    <tr align="center">
                                        <td>
                                            <g:link controller="roleCategoryMenu" style="color: #3498DB" action="showMenu" params="[role: this.role?.id, category: it?.id]">${it?.name}</g:link>
                                        </td>
                                        <td>${it?.parent?.name}</td>
                                        <td>${it?.url}</td>
                                        <td>${it?.orderNum}</td>
                                    </tr>
                                </g:each>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="hpanel hviolet">
                    <div class="panel-heading">
                        <div class="panel-tools">
                            <a class="showhide">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                        用户
                    </div>


                    <div class="panel-body no-padding">
                        <div class="table-responsive">
                            <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center">
                                <thead>
                                <tr>
                                    <g:sortableColumn property="username" title="用户名" class="col-md-1 text-center"
                                                      params="${params}"/>
                                    <g:sortableColumn property="fullName" title="姓名" class="col-md-1 text-center"
                                                      params="${params}"/>
                                    <g:sortableColumn property="cellphone" title="手机号" class="col-md-1 text-center"
                                                      params="${params}"/>
                                    <g:sortableColumn property="account" title="所属机构" class="col-md-1 text-center"
                                                      params="${params}"/>
                                </tr>
                                </thead>
                                <tbody>
                                <g:each in="${userList}">
                                    <tr align="center">
                                        <td>
                                            <g:link controller="user" style="color: #3498DB" action="show" id="${it?.id}">${it.username}</g:link>
                                        </td>
                                        <td>${it.fullName}</td>
                                        <td>${it.cellphone}</td>
                                        <td>${it.account?.name}</td>
                                    </tr>
                                </g:each>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>

</html>
